package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.WxFeedbackMapper;
import com.ruoyi.business.domain.WxFeedback;
import com.ruoyi.business.service.IWxFeedbackService;

/**
 * 意见反馈Service业务层处理
 * 
 * @author asher
 * @date 2021-11-14
 */
@Service
public class WxFeedbackServiceImpl implements IWxFeedbackService 
{
    @Autowired
    private WxFeedbackMapper wxFeedbackMapper;

    /**
     * 查询意见反馈
     * 
     * @param feedbackId 意见反馈主键
     * @return 意见反馈
     */
    @Override
    public WxFeedback selectWxFeedbackByFeedbackId(Long feedbackId)
    {
        return wxFeedbackMapper.selectWxFeedbackByFeedbackId(feedbackId);
    }

    /**
     * 查询意见反馈列表
     * 
     * @param wxFeedback 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<WxFeedback> selectWxFeedbackList(WxFeedback wxFeedback)
    {
        return wxFeedbackMapper.selectWxFeedbackList(wxFeedback);
    }

    /**
     * 新增意见反馈
     * 
     * @param wxFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int insertWxFeedback(WxFeedback wxFeedback)
    {
        wxFeedback.setCreateTime(DateUtils.getNowDate());
        return wxFeedbackMapper.insertWxFeedback(wxFeedback);
    }

    /**
     * 修改意见反馈
     * 
     * @param wxFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int updateWxFeedback(WxFeedback wxFeedback)
    {
        wxFeedback.setUpdateTime(DateUtils.getNowDate());
        return wxFeedbackMapper.updateWxFeedback(wxFeedback);
    }

    /**
     * 批量删除意见反馈
     * 
     * @param feedbackIds 需要删除的意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteWxFeedbackByFeedbackIds(Long[] feedbackIds)
    {
        return wxFeedbackMapper.deleteWxFeedbackByFeedbackIds(feedbackIds);
    }

    /**
     * 删除意见反馈信息
     * 
     * @param feedbackId 意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteWxFeedbackByFeedbackId(Long feedbackId)
    {
        return wxFeedbackMapper.deleteWxFeedbackByFeedbackId(feedbackId);
    }
}
